package spring.my.db.sharding.demo.service;

import spring.my.db.sharding.demo.dto.StudentPageReqDTO;
import spring.my.db.sharding.demo.dto.StudentReqDTO;
import spring.my.db.sharding.demo.dto.StudentResDTO;
import spring.my.db.sharding.demo.exception.BzException;
import spring.my.db.sharding.demo.response.Page;

import java.util.List;

public interface StudentService {

    /**
     * 查询列表
     *
     * @param dto
     * @return
     */
    List<StudentResDTO> list(StudentReqDTO dto);


    /**
     * 分页查询
     *
     * @param dto
     * @return
     */
    Page<StudentResDTO> page(StudentPageReqDTO dto);

    /**
     * 保存
     *
     * @param dto
     * @return
     */
    boolean save(StudentReqDTO dto) throws BzException;

    /**
     * select by primaryKey
     *
     * @param id
     * @return
     */
    StudentResDTO detail(Long id);
}
